package cn.itcast.Exercise3;

class Point {
    public void setPoint(int x, int y) {
        this.x = x;
        this.y = y;
    }
    public void deplace(int dx, int dy) {
        x += dx;
        y += dy;
    }
    public void affCoord() {
        System.out.println("Coordonnees : " + x + " " + y);
    }
    private int x, y;
}

class Pointnom extends Point {
    String name;
    public void setPointNom(int a, int b, String name) {
        setPoint(a, b);
        this.name = name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public void affCoordNom() {
        System.out.print(name + " ");
        affCoord();
    }
}

public class Exercise3 {
    public static void main(String[] args) {
        Pointnom p = new Pointnom();
        p.setPointNom(1, 2, "ASD");
        p.affCoordNom();
    }
}
